# JPEG 8 bits project

include_directories(BEFORE
  ${CMAKE_CURRENT_BINARY_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR})
add_library(${JPEG_LIBRARY_NAME}8 ${JPEG_SOURCES})
set_target_properties(${JPEG_LIBRARY_NAME}8 PROPERTIES ${JPEG_LIBRARY_PROPERTIES})
if(NOT JPEG_INSTALL_NO_LIBRARIES)
  install(TARGETS ${JPEG_LIBRARY_NAME}8
    EXPORT ${GDCM_TARGETS_NAME}
    RUNTIME DESTINATION ${JPEG_INSTALL_BIN_DIR} COMPONENT Applications
    LIBRARY DESTINATION ${JPEG_INSTALL_LIB_DIR} COMPONENT Libraries ${NAMELINK_SKIP}
    ARCHIVE DESTINATION ${JPEG_INSTALL_LIB_DIR} COMPONENT DebugDevel
  )
  if(NAMELINK_ONLY)
  install(TARGETS ${JPEG_LIBRARY_NAME}8
    EXPORT ${GDCM_TARGETS_NAME}
    LIBRARY DESTINATION ${JPEG_INSTALL_LIB_DIR} COMPONENT DebugDevel ${NAMELINK_ONLY}
  )
  endif()
endif()

if(NOT JPEG_INSTALL_NO_DEVELOPMENT)
  file(GLOB header_files "${CMAKE_CURRENT_BINARY_DIR}/*.h")
  install(FILES ${header_files}
    DESTINATION ${JPEG_INSTALL_INCLUDE_DIR}/8 COMPONENT DebugDevel
  )
endif()
